package com.woniuxy.ptapp.client;

import com.woniuxy.commons.util.Result;
import com.woniuxy.ptapp.client.param.ByClassesParam;
import com.woniuxy.ptapp.client.param.ClassesDto;
import com.woniuxy.ptapp.client.param.ClassesParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
@Component
@Api(tags = "课程接口")
@FeignClient(value = "yoga-pt",path="/pt",contextId ="ClassesInfoClient")
public interface ClassesInfoClient {
    @ApiOperation("新增课程(管理员,场馆)")
    @PostMapping("/upClasses")
    public Result upClasses(@Valid @RequestBody ClassesParam classesParam);
    @ApiOperation("检查课程是否存在(前置判断)")
    @PostMapping("/checkClaessId")
    public Result<Boolean> checkClaessId(@RequestParam Integer id);
}
